# Remove the oldest connection from the heap.
import heapq

from emi.trade.data import Offset

sessions = []


heapq.heappush(sessions, (3.2,"a3.2" ))
heapq.heappush(sessions, (1.6,"b1.6" ))
heapq.heappush(sessions, (4.2,"c4.2" ))

#i, value = heapq.heappop(sessions)

##返回最小只
assert len(sessions) == 3
print(f"{ heapq.heappop(sessions)}")
print(f"{ heapq.heappop(sessions)}")
print(f"{ heapq.heappop(sessions)}")
assert len(sessions) == 0


print(f"{Offset.OPEN.value}")
print(f"{Offset('开')}")